package com.joinlabs.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.joinlabs.entity.Group;
import com.joinlabs.mapper.GroupMapper;
import com.joinlabs.mapper.UserMapper;
import com.joinlabs.service.IGroupService;
@Service("groupService")
public class GroupServiceImpl implements IGroupService {
	@Resource
	private GroupMapper groupMapper;

	@Override
	public List<Group> selecGroupChengYuan(int userid) {
		List<Group> group = groupMapper.selecGroupChengYuan(userid);
		return group;
	}

	@Override
	public int insertFenZuService(int userid, int zuid) {
		int rs = groupMapper.insertFenZu(userid,zuid);
		return rs;
	}

	@Override
	public long selecZuIdByZuNameService(int userid, String xuyaoxiugai) {
		long rs = groupMapper.selecZuIdByZuName(userid,xuyaoxiugai);
		return rs;
	}

	@Override
	public long deleteFenZuByZuiId(long deleteZuid) {
		long rs = groupMapper.deleteFenZuByZuiId(deleteZuid);
		return rs;
	}

	@Override
	public void insertNewFenZuService(int userid, String zuMin) {
		// TODO Auto-generated method stub
		groupMapper.insertNewFenZu(userid,zuMin);
	}

}
